﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:CustomControls" >

    <!--
    Because we're DYNAMICALLY switching layouts in this demo, we don't need to explicityly
    reference ResourceDictionaries containing the layout styles.  An ACTUAL application
    with a SINGLE layout should use StaticResources, and need a MergedDictionaries section
    -->

    
    <Style TargetType="{x:Type local:CustomWindow}">

        <!-- Remove default frame appearance -->
        <Setter Property="WindowStyle" Value="None"/>
        <Setter Property="AllowsTransparency" Value="True"/>

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:CustomWindow}" >

                    <ContentControl x:Name="PART_CustomFrame" Style="{DynamicResource FrameLayout}" >

                        <ContentPresenter x:Name="ClientArea" />

                    </ContentControl>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>